package com.ruoyi.system.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import com.qiniu.util.Auth;
// 使用全限定名引用，避免与Spring的Configuration冲突
// import com.qiniu.storage.Configuration;

/**
 * 七牛云配置
 *
 * @author ruoyi
 */
@ConfigurationProperties(prefix = "qiniu")
@Configuration
public class QiniuConfig
{
    /**
     * 访问密钥
     */
    private String accessKey;

    /**
     * 密钥
     */
    private String secretKey;

    /**
     * 存储空间名
     */
    private String bucket;

    /**
     * 区域：华东(huadong)、华北(huabei)、华南(huanan)、北美(beimei)、新加坡(xinjiapo)
     */
    private String region = "huadong";

    /**
     * 外链域名
     */
    private String domain;

    /**
     * 是否使用HTTPS
     */
    private boolean useHttps = true;

    /**
     * 连接超时时间（秒）
     */
    private int connectTimeout = 10;

    /**
     * 响应超时时间（秒）
     */
    private int responseTimeout = 60;

    public String getAccessKey()
    {
        return accessKey;
    }

    public void setAccessKey(String accessKey)
    {
        this.accessKey = accessKey;
    }

    public String getSecretKey()
    {
        return secretKey;
    }

    public void setSecretKey(String secretKey)
    {
        this.secretKey = secretKey;
    }

    public String getBucket()
    {
        return bucket;
    }

    public void setBucket(String bucket)
    {
        this.bucket = bucket;
    }

    public String getRegion()
    {
        return region;
    }

    public void setRegion(String region)
    {
        this.region = region;
    }

    public String getDomain()
    {
        return domain;
    }

    public void setDomain(String domain)
    {
        this.domain = domain;
    }

    public boolean isUseHttps()
    {
        return useHttps;
    }

    public void setUseHttps(boolean useHttps)
    {
        this.useHttps = useHttps;
    }

    public int getConnectTimeout()
    {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout)
    {
        this.connectTimeout = connectTimeout;
    }

    public int getResponseTimeout()
    {
        return responseTimeout;
    }

    public void setResponseTimeout(int responseTimeout)
    {
        this.responseTimeout = responseTimeout;
    }

}